<!--
  描述：产品图文table页
  @author yangshuangping
  @since 2021/12/09 17:41
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<table class="layui-hide" id="zmn-table" lay-filter="zmn-table" th:fragment="table">
    <thead>
    <tr>
        <th lay-data="{type:'checkbox', width:50, unresize:true, align:'center', fixed:'left'}"></th>
        <th lay-data="{field:'graphicId', width:80, unresize:true, align:'center'}">ID</th>
        <th lay-data="{field:'sort', width:100, unresize:true, sort:true, align:'center', edit:'text'}">
            排序
        </th>
        <th lay-data="{field:'graphicImgUrl', unresize:true, align:'center'}">图片</th>
        <th lay-data="{field:'graphicGroup', unresize:true, align:'center'}">分组名称</th>
        <th lay-data="{field:'graphicTitle',unresize:true, align:'center'}">标题</th>
        <th lay-data="{field:'status', unresize:true, align:'center'}">状态</th>
        <th lay-data="{field:'updateTime', unresize:true, align:'center'}">最近修改人/时间</th>
        <th lay-data="{field:'操作', width:140, unresize:true, align:'center', fixed:'right'}">操作</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="item:${items}">
        <td></td>
        <td th:text="${item.graphicId}">graphicId</td>
        <td th:text="${item.sort}">sort</td>
        <td>
            <div th:if="${item.graphicImgUrl != '' and item.graphicImgUrl != null}">
                <img style="color: #00a0e9"
                     width="50px"
                     height="50px"
                     th:id="${'graphic_'+item.graphicId}"
                     th:onclick="thePreviewImage([[${'graphic_'+item.graphicId}]])"
                     th:src="${item.graphicImgUrl}">
            </div>
        </td>
        <td th:text="${item.graphicGroup}">graphicGroup</td>
        <td th:text="${item.graphicTitle}">graphicTitle</td>
        <td>
            <input type="checkbox"
                   name="status"
                   id="status"
                   th:key="${item.graphicId}"
                   th:value="${item.status}"
                   lay-text="ON|OFF"
                   lay-skin="switch"
                   lay-filter="chk_status_flag"
                   th:checked="${item.status == 2}"/>
        </td>
        <td th:text="${(item.updater==null?'':item.updater+'/')+(item.updateTime==null?''
        :#dates.format(item.updateTime,'yyyy-MM-dd HH:mm:ss'))}">
        </td>
        <td>
            <div><a style="color: #00a0e9"
                    href="#"
                    th:onclick="|addAndModifyGraphic([[${servProductVO.productId}]],[[${item.graphicId}]])|"
                    lay-text="修改"
                    text="修改">修改</a>&nbsp;&nbsp;
            </div>
        </td>
    </tr>
    </tbody>
</table>
